<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>forEach() 方法使用</title>
</head>
<body>
    <script>
        let arr = [23,45,7,13,9,61];

        arr.forEach(function (value,index){
            console.log(index,value)
            if(value<10){
                //改变数组元素
                arr[index] = 0
            }
        });

        setInterval(() => {},1000)

        console.log(arr)
    </script>
</body>
</html>